Controlling Program Execution
Once a
breakpoint is reached and the program stops, you can control execution with
commands on the Run menu. The following list shows the commands and their
actions.
Command |
Action |
Restart |
Resets
execution to the first line of the program. It reloads the program into
memory and discards the current values of all variables. |
Stop
Debugging |
Terminates
the debugging session and returns to a normal editing session. |
Go |
Executes
code from the current statement until a breakpoint or the end of the program
is reached. |
Attach |
Selects a
running process to debug. |
Continue to
Cursor |
Executes
the program as far as the line that currently has the cursor. This is
equivalent to setting a temporary breakpoint at the cursor location. |
Trace Into |
Steps into
a function when it is called and steps through all of the instructions in the
function. |
Step Over |
Single-steps
through instructions in the program. If this command is used when you reach a
function call, the function is executed without stepping through the function
instructions. |
Halt |
Halts the
program and returns control to WinDbg. |
Go Handled |
Continues
the execution of a program that has stopped at an exception, marking the
exception as having been handled. |
Go
Unhandled |
Continues
the execution of a program that has stopped at an exception, without marking
the exception has having been handled. The system attempts to locate an
exception handler defined by the application. |
Set Thread |
Selects a
thread to monitor with the debugger. This determines which thread receives
debugger commands and is viewed by the display windows. Also freezes and
thaws individual threads. |
Set Process |
Selects a
process to monitor with the debugger. This determines which process receives
debugger commands and is viewed by the display windows. |
Source/Asm
Mode |
Toggles
between source and assembly modes. |